﻿using ITXHWEB.Models;
using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Web.Mvc;
using WPFExcelReport;
using WPFExcelReport.Helpers;
using ITXHWEB.Infrastructure;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace ITXHWEB.Controllers
{
    public partial class WBBSTController : ITXController
    {
        [ChildActionOnly]
        public ActionResult MPRWB06(string returnUrl)
        {
            ModelState.Clear();
            MWB.IsWHReady = true;
            MWB.INFO = "";
            MWB.INFO = INFO+ "品种:"+MWB.ART+"色号:"+MWB.FARBE;
            ViewBag.ReturnUrl = returnUrl;

            foreach (KeyValuePair<string, string> kp in MWB.WHPCS)
            {
                MWB.INFO += kp.Key + ":" + kp.Value + ";";
            }
            return PartialView(MWB);
        }
        [HttpPost]
        [AllowAnonymous]
        [ValidateAntiForgeryToken]
        public ActionResult MPRWB06(WBBSTModel model, string returnUrl)
        {

            try
            {
                MWB.WHPCS.Clear();
                MWB.INFO = "";
                CHKZZSTK();
            }
            catch (Exception ex)
            {
                //VKPAUF = ex.Message;
                Tracer.Error(ex.StackTrace, ex);
            }
            return RedirectToAction(MAPP, MAPP);
        }
    }
}
